package schedual;

import redis.clients.jedis.Jedis;
import utiles.JedisUtils;

public class UrlSchedual implements Schedual {
    @Override
    public void push(String urls, String url) {
        Jedis jedis = JedisUtils.getJedis();
        jedis.lpush(urls,url);
        jedis.close();
    }
    @Override
    public String poll(String urls) {
        Jedis jedis = JedisUtils.getJedis();
        return jedis.rpop(urls);
    }
}
